package com.tegtech.api.quartz.domain;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 定时任务调度日志表 sys_job_log
 * 
 * @author Jun
 */

@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("sys_job_log")
public class SysJobLog implements Serializable {
	
	private static final long serialVersionUID = 1L;

	/** ID */
	@Excel(name = "日志序号", type = 10)
	@TableId(value = "job_log_id", type = IdType.AUTO)
	private Long jobLogId;

	/** 任务名称 */
	@Excel(name = "任务名称", width = 15)
	private String jobName;

	/** 任务组名 */
	@Excel(name = "任务组名", width = 15)
	private String jobGroup;

	/** 调用目标字符串 */
	@Excel(name = "调用目标字符串", width = 20)
	private String invokeTarget;

	/** 日志信息 */
	@Excel(name = "日志信息", width = 50)
	private String jobMessage;

	/** 执行状态（0正常 1失败） */
	@Excel(name = "执行状态", replace = {"正常_0","失败_1"})
	private String status;

	/** 异常信息 */
	@Excel(name = "异常信息", width = 30)
	private String exceptionInfo;

	/**
	 * 创建时间
	 */
	@TableField(fill = FieldFill.INSERT)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;

	/**
	 * 请求参数
	 */
	@TableField(exist = false)
	private Map<String, Object> params = new HashMap<>();

	/** 开始时间 */
	@TableField(exist = false)
	private Date startTime;

	/** 停止时间 */
	@TableField(exist = false)
	private Date stopTime;

}
